﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
//using System.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Subjects;

namespace ReactiveSamples
{
    class Program
    {

        static void Main(string[] args)
        {
            IObservable<long> whenSecondsElapse = Observable.Interval(TimeSpan.FromSeconds(1));
            whenSecondsElapse.Subscribe(Console.WriteLine);
            Thread.Sleep(Timeout.Infinite);

            //Subject<string> whenNewInputArrives = new Subject<string>();
            //whenNewInputArrives.Subscribe(newInput => Console.WriteLine("CPU> " + newInput));
            //while (true)
            //{
            //    Console.Write("YOU> ");
            //    string input = Console.ReadLine();
            //    if (input == "STOP") whenNewInputArrives.OnCompleted();
            //    whenNewInputArrives.OnNext(input);
            //}
        }
    }
}
